import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.HashMap;

import javax.swing.Timer;


public class TimeTicker
{
	private static final int DELAY = 1000;
	
	private HashMap<Integer, Entry> my_entries;
	private Timer timer;
	private int current_tick;
	
	public TimeTicker(final HashMap<Integer, Entry> the_entries)
	{
		my_entries = the_entries;
		
		current_tick = 0;
	}
	
	public void start()
	{
		System.out.println("Time ticker started.");
		timer = new Timer(DELAY, new Tick());
		timer.start();
	}
	
	public void stop()
	{
		timer.stop();
	}

	private class Tick implements ActionListener
	{
		@Override
		public void actionPerformed(ActionEvent e)
		{
			current_tick++;
			
			System.out.println(current_tick);
		}
	}
}